package com.demo.map.controller;


import cn.hutool.json.JSONUtil;
import com.demo.map.service.IChannelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Slf4j
@RestController
public class TestController {
    @Autowired
    private Map<String, IChannelService> channelServiceMap;

    @GetMapping("/test")
    public void test(){
        //根据渠道编码获取相应的处理方法
        IChannelService channelService = channelServiceMap.get("A");
        channelService.handle();
    }

}
